﻿using System;
using System.Collections.Generic;
using System.Data.OleDb;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Common;

namespace Print
{
    public partial class News : PrintPageBase
    {
        private PBLL.PMenu bllMenu = new PBLL.PMenu();
        private PBLL.PNews bllNews = new PBLL.PNews();
        public string mid = "1";
        public string ps = "10";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string title = config.P_Title;
                BaseRpt.DataSource = bllMenu.GetList("AShow=true");
                OleDbDataReader dr = bllMenu.GetDr("MUrl='news.aspx'");
                if (dr.Read())
                {
                    ps = dr["Page"].ToString();
                    GetAd(AdRpt, dr["MTitle"].ToString());
                    title = dr["MTitle"].ToString() + "-" + config.P_Name;
                    mid = dr["Id"].ToString();
                    bTit.InnerHtml = "<strong>" + dr["MTitle"].ToString() + "</strong> <span class=\"soft\">" + dr["MEn"].ToString() + "</span>";
                }
                Page.Header.Title = title;
                dr.Close();
            }
        }
    }
}